<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org" xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
  layout:decorator="layouts/layout" th:with="header='打印任务', subtext='新增打印任务'">

<head>
	<title>打印任务</title>
</head>
<body>
	<th:block layout:fragment="content">
		<div class="box">
			<div class="box-body">
				<form id="taskForm" name="taskForm" th:object="${m}" th:action="@{|${baseUrl}/save${m.id==null?'':'/' + m.id}|}" method="post" class="form-horizontal" novalidate="novalidate">
					<input id="id" type="hidden" name="id" th:field="*{id}" />
					<input id="version" type="hidden" name="version" th:field="*{version}" />
					<div class="row line">
						<div class="col-lg-6">
							<h3 class="page-header">基本设置</h3>
						</div>
					</div>
					
                  			<div class="row">
								<div class="col-sm-6">
									<div class="form-group">
										<label class="control-label col-lg-3 required">模板</label>
										<div class="col-sm-8">
											<select class="form-control required" th:field="*{templateCode}">
								                <option value="">请选择</option>
								                <option th:each="a : ${@DATAS.templates}" th:value="${a.code}" th:text="${a.fullname}" th:if="${#strings.isEmpty(params['templateCode'])?true:(params['templateCode'] == ''+a.code)}"/>
								            </select>
							            </div>
									</div>
								</div>
						   </div>	
					
                  			<div class="row">
								<div class="col-sm-6">
									<div class="form-group">
										<label class="control-label col-lg-3 required">打印机</label>
										<div class="col-sm-8">
											<select class="form-control required" th:field="*{printerCode}">
								                <option value="">请选择</option>
								                <option th:each="a : ${@DATAS.printers}" th:value="${a.code}" th:text="${a.fullname}" th:if="${#strings.isEmpty(params['templateCode'])?true:(params['templateCode'] == ''+a.code)}"/>
								            </select>
							            </div>
									</div>
								</div>
						   </div>	
						   
                  			<div class="row">
								<div class="col-sm-6">
									<div class="form-group">
										<label class="control-label col-sm-3 mg-top-6 ">起始号</label>
										<div class="col-sm-8 form-control-static">
											<input id="seqFromNumber" name="seqFromNumber" th:value="*{seqFromNumber}" maxlength="20"
											class="form-control" />
										</div>
									</div>
								</div>
						   </div>	
                  			<div class="row">
								<div class="col-sm-6">
									<div class="form-group">
										<label class="control-label col-sm-3 mg-top-6 ">结束号</label>
										<div class="col-sm-8 form-control-static">
											<input id="seqToNumber" name="seqToNumber" th:value="*{seqToNumber}" maxlength="20"
											class="form-control" />
										</div>
									</div>
								</div>
						   </div>		
                  			<div class="row">
								<div class="col-sm-6">
									<div class="form-group">
										<label class="control-label col-sm-3 mg-top-6 ">打印份数</label>
										<div class="col-sm-8 form-control-static">
											<input id="copies" name="copies" th:value="*{copies}" maxlength="20"
											class="form-control" />
										</div>
									</div>
								</div>
						   </div>			
					  	   <div class="hr-line-dashed"></div>
						   <div class="form-group">
								<div class="text-center">
									<a class="btn btn-default " th:href="@{|${baseUrl}|}"> 
									    <i class="fa fa-fw fa-reply"></i> 返回
									</a>
									<!-- 
									<a class="btn btn-default " th:href="@{|${baseUrl}/printlocal|}"> 
									    <i class="fa fa-fw fa-reply"></i> 本地打印
									</a>  
									-->
									<button type="submit" class="btn btn-primary">
										<i class="fa fa-fw  fa-save"></i> 打印
									</button>
								</div>
						  </div>	
				</form>
			</div>
		</div>
	</th:block>
	<th:block layout:fragment="scripts">
		<script th:replace="layouts/fragments/validatejs :: validate"></script>
		<script th:inline="javascript"></script>
		
		<script th:inline="javascript">
	   	  // 后端传入前端使用的变量JS中定义
	      //var batchIds = /*[[${ids}]]*/'';
	   	</script>
		
		<script th:src="@{|${theme}/js/app/task/printatask_form.js?v=${applicationVersion}|}" th:inline="javascript"></script>
	</th:block>
</body>

</html>